// 672. 灯泡开关 Ⅱ
/**
 * @param {number} n
 * @param {number} presses
 * @return {number}
 */
var flipLights = function (n, presses) {
	if (presses == 0) return 1
	if (n <= 2) return n == 1 ? 2 : presses == 1 ? 3 : 4
	return presses <= 2 ? (presses == 1 ? 4 : 7) : 8
}
flipLights(2, 2)
